package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type OutAccountRequest struct {
	Appid string `json:"appid" form:"appid"`

	Appsecret string `json:"appsecret" form:"appsecret"`

	Title string `json:"title" form:"title"`

	Status string `json:"status" form:"status"`

	RulesContent string `json:"rules_content" form:"rules_content"`

	AddTime string `json:"add_time" form:"add_time"`

	LastTime string `json:"last_time" form:"last_time"`

	Ip string `json:"ip" form:"ip"`

	IsDel string `json:"is_del" form:"is_del"`

	PushOpen string `json:"push_open" form:"push_open"`

	PushAccount string `json:"push_account" form:"push_account"`

	PushPassword string `json:"push_password" form:"push_password"`

	PushTokenUrl string `json:"push_token_url" form:"push_token_url"`

	UserUpdatePush string `json:"user_update_push" form:"user_update_push"`

	OrderCreatePush string `json:"order_create_push" form:"order_create_push"`

	OrderPayPush string `json:"order_pay_push" form:"order_pay_push"`

	RefundCreatePush string `json:"refund_create_push" form:"refund_create_push"`

	RefundCancelPush string `json:"refund_cancel_push" form:"refund_cancel_push"`
}

func (r *OutAccountRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *OutAccountRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"appid": "required",

		"appsecret": "required",

		"title": "required",

		"status": "required",

		"rules": "required",

		"add_time": "required",

		"last_time": "required",

		"ip": "required",

		"is_del": "required",

		"push_open": "required",

		"push_account": "required",

		"push_password": "required",

		"push_token_url": "required",

		"user_update_push": "required",

		"order_create_push": "required",

		"order_pay_push": "required",

		"refund_create_push": "required",

		"refund_cancel_push": "required",
	}
}

func (r *OutAccountRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *OutAccountRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *OutAccountRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
